package com.ruoyi.community.mapper;

import java.util.List;
import com.ruoyi.community.domain.CpcActivityEnroll;
import com.ruoyi.community.domain.OwnerActivityEnroll;
import org.apache.ibatis.annotations.Param;

/**
 * 党建活动报名Mapper接口
 * 
 * @author ruoyi
 * @date 2021-12-22
 */
public interface CpcActivityEnrollMapper 
{
    /**
     * 查询党建活动报名
     * 
     * @param id 党建活动报名ID
     * @return 党建活动报名
     */
    public CpcActivityEnroll selectCpcActivityEnrollById(String id);

    /**
     * 查询党建活动报名列表
     * 
     * @param cpcActivityEnroll 党建活动报名
     * @return 党建活动报名集合
     */
    public List<CpcActivityEnroll> selectCpcActivityEnrollList(CpcActivityEnroll cpcActivityEnroll);

    // 查询活动id对应的报名记录
    public List<CpcActivityEnroll> selectCpcActivityEnrollListById(String id);

    /**
     * 新增党建活动报名
     * 
     * @param cpcActivityEnroll 党建活动报名
     * @return 结果
     */
    public int insertCpcActivityEnroll(CpcActivityEnroll cpcActivityEnroll);

    public Integer hasEnrolled(@Param("userId") String userId,
                               @Param("activityId") String activityId);

    /**
     * 修改党建活动报名
     * 
     * @param cpcActivityEnroll 党建活动报名
     * @return 结果
     */
    public int updateCpcActivityEnroll(CpcActivityEnroll cpcActivityEnroll);

    /**
     * 删除党建活动报名
     * 
     * @param id 党建活动报名ID
     * @return 结果
     */
    public int deleteCpcActivityEnrollById(String id);

    /**
     * 批量删除党建活动报名
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteCpcActivityEnrollByIds(String[] ids);
}
